package com.exercise01_1;

public class TestDemo {
    public static void main(String[] args) {
        /*
        *  测试类： 无参
        * */
        System.out.println("----------------------------无参打印结果----------------------------");
        JavaTeacher javaTeacher = new JavaTeacher();
        javaTeacher.setName("张三");
        javaTeacher.setSex("男");
        javaTeacher.setAge(38);
        System.out.println("姓名: " + javaTeacher.getName() +
            ",性别: " + javaTeacher.getSex() +
            ",年龄: " + javaTeacher.getAge() +
            "的" + javaTeacher.work());

        UITeacher uiTeacher = new UITeacher();
        uiTeacher.setName("李四");
        uiTeacher.setSex("女");
        uiTeacher.setAge(28);
        System.out.println("姓名: " + uiTeacher.getName() +
                ",性别: " + uiTeacher.getSex() +
                ",年龄: " + uiTeacher.getAge() +
                "的" + uiTeacher.work());
        System.out.println("姓名: " + uiTeacher.getName() +
                ",性别: " + uiTeacher.getSex() +
                ",年龄: " + uiTeacher.getAge() +
                "的" + uiTeacher.draw());

        /*
        *  测试类 有参
        * */
        System.out.println("----------------------------有参打印结果----------------------------");

        JavaTeacher javaTeacherWithParam = new JavaTeacher("张三","男",38);
        System.out.println("姓名: " + javaTeacherWithParam.getName() +
                ",性别: " + javaTeacherWithParam.getSex() +
                ",年龄: " + javaTeacherWithParam.getAge() +
                "的" + javaTeacherWithParam.work());
        UITeacher uiTeacherWithParam = new UITeacher("李四", "女", 28);
        System.out.println("姓名: " + uiTeacherWithParam.getName() +
                ",性别: " + uiTeacherWithParam.getSex() +
                ",年龄: " + uiTeacherWithParam.getAge() +
                "的" + uiTeacherWithParam.work());
        System.out.println("姓名: " + uiTeacherWithParam.getName() +
                ",性别: " + uiTeacherWithParam.getSex() +
                ",年龄: " + uiTeacherWithParam.getAge() +
                "的" + uiTeacherWithParam.draw());
    }
}
